#define _CRT_SECURE_NO_WARNINGS 1

#include"RBTree.h"

int main()
{
	int a[] = { 16,3,7,11,9,26,18,14,15 };
	//int a[] = { 4,2,6,1,3,5,15,7,16,14 };
	srand(time(0));
	const int N = 20;
	vector<int> v;
	v.reserve(N);
	for (int i = 0; i < N; i++)
	{
		int n = rand();
		//cout << n << " ";
		v.push_back(n);
	}
	cout << endl;
	RBTree<int, int>* root = new RBTree<int, int>();
	for (auto e : a)
	{
		root->insert(make_pair(e, e));
	}
	//root->InOrder();
	cout << root->isBalance() << endl;
	return 0;
}